package com.zhuoyue.biz.core.command.model;

import com.zhuoyue.common.utils.CmdUtils;
import lombok.Data;

/**
 * @author wjming
 */
@Data
public class SceneCmd {
    private String gatewayMac;
    private String sceneNumber;
    private String cmdCount;
    private String time;
    private String dataLength;
    private String orderNumber;
    private String loadCmd;
    private String timeExpand;
    private String first;

    /**
     * 场景配置
     *
     * @param gatewayMac
     * @param sceneNumber
     * @param cmdCount
     * @param time
     */
    public SceneCmd(String gatewayMac, String sceneNumber, String cmdCount, String first, String time) {
        this.gatewayMac = gatewayMac;
        this.sceneNumber = sceneNumber;
        this.cmdCount = cmdCount;
        this.time = time;
        this.first = first;
    }

    public SceneCmd(String gatewayMac, String sceneNumber, String cmdCount, String dataLength, String orderNumber, String loadCmd, String timeExpand) {
        this.gatewayMac = gatewayMac;
        this.sceneNumber = sceneNumber;
        this.cmdCount = cmdCount;
        this.dataLength = dataLength;
        this.orderNumber = orderNumber;
        this.loadCmd = loadCmd;
        this.timeExpand = timeExpand;
    }

    public SceneCmd(String gatewayMac, String sceneNumber) {
        this.gatewayMac = gatewayMac;
        this.sceneNumber = sceneNumber;
    }

    public String getCmd(String modeCmd) {
        return CmdUtils.getCmd(this, modeCmd);
    }
}
